home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-06 / logcopy.zip / SETDIR.PAS < prev    next >
Pascal/Delphi Source File  |  1992-08-03  |  2KB  |  53 lines

  1. (*$include:'SETDIR.INT'*)
  2.  
  3. Implementation of SETDIR;
  4.  
  5. (**********************************************************************)
  6. (*                                                                    *)
  7. (*    Implementation of Netware Directory Function Calls              *)
  8. (*                                                                    *)
  9. (**********************************************************************)
  10.  
  11.   Function net_directory_request:Integer [c,varying] ; external;
  12.  
  13. (**********************************************************************)
  14. (*                                                                    *)
  15. (*  Directory Function 19 : Allocate a Temporary Base                 *)
  16. (*                                                                    *)
  17. (**********************************************************************)
  18.  
  19.   Function  net_alloc_temp_base(* Drivename : char;
  20.                                    Sourcebase : Integer;
  21.                                    Const Path : Lstring;
  22.                                    Var Newbase: Integer;
  23.                                    Var mask   : Integer  *);
  24.     Type
  25.       req_type   = Record
  26.                      size   [00] : Word;
  27.                      func   [02] : Byte;
  28.                      base   [03] : Byte;
  29.                      drive  [04] : char;
  30.                      path   [05] : Lstring(255);
  31.                    End;
  32.       reply_type = Record
  33.                      size    [00] : Word;
  34.                      base    [02] : Byte;
  35.                      mask    [03] : Byte;
  36.                    End;
  37.     Var
  38.       req   : req_type;
  39.       reply : reply_type;
  40.     Begin
  41.       req.size:=sizeof(req)-2;
  42.       reply.size:=sizeof(reply)-2;
  43.       req.func:=19;
  44.       req.base:=wrd(sourcebase);
  45.       copylst(path,req.path);
  46.       req.drive:=drivename;
  47.       net_alloc_temp_base:=net_directory_request(ads reply,ads req);
  48.       newbase:=ord(reply.base);
  49.       mask:=ord(reply.mask);
  50.     End; (* net_alloc_temp_base *)
  51.  
  52. END.  (* End of implementation of SETDIR *)
  53.